package chapter04.d1_fileio.demo3;

import java.io.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/5/8
 * @Description: addition and subtraction
 */
public class FileDeSerializerTest  {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fileInputStream = new FileInputStream("D:\\Student2.txt");
        ObjectInputStream inputStream = new ObjectInputStream(fileInputStream);
        List<Student> students = (List<Student>) inputStream.readObject();
        for(Student student : students){
            System.out.println(student);
        }
    }



}
